import unittest
import ddt


@ddt.ddt
class TestDemo(unittest.TestCase):
    data_list = [
        {'username': 'root', 'pwd': '123456'},
        {'username': 'root1', 'pwd': '123456'},
    ]

    # 装饰器
    @ddt.data(*data_list)
    def test_method1(self, data):
        print(data)


if __name__ == '__main__':
    unittest.main(verbosity=2)
